﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace AMS.Inventory.PCClient.InventoryHelpClass
{
    class Worker
    {
        //define an event
        public event EventHandler<CurrentCountEventArgs> CurrentCountEvent;

        public void DoSomething(int maxValue)
        {
            for (int i = 0; i < maxValue; i++)
            {
                
                var currentCountEventArgs = new CurrentCountEventArgs {CurrentCount = i};
                //raise the event
                CurrentCountEvent(this, currentCountEventArgs);
            }
        }
    }
}
